negotiator.boaframework
Class NegotiationSession

java.lang.Object
  extended by negotiator.boaframework.NegotiationSession
Direct Known Subclasses:
NegotiationSessionWrapper

public class NegotiationSession
extends java.lang.Object

This is a class which manages all the negotiation session pertinent information to a single agent.

Author:
Alex Dirkzwager, Mark Hendrikx

Field Summary
protected  Domain domain
          Reference to the negotiation domain.
protected  BidHistory opponentBidHistory
          History of bids made by the opponent.
protected  OutcomeSpace outcomeSpace
          Optional outcomespace which should be set manually.
protected  BidHistory ownBidHistory
          History of bids made by the agent.
protected  Timeline timeline
          Reference to the timeline.
protected  UtilitySpace utilitySpace
          Reference to the agent's preference profile for the domain.
 
Constructor Summary
protected NegotiationSession()
          Special constructor used by the NegotiationSessionWrapper.
  NegotiationSession(SessionData sessionData, UtilitySpace utilitySpace, Timeline timeline)
          Create a negotiation session which is used to keep track of the negotiation state.
  NegotiationSession(SessionData sessionData, UtilitySpace utilitySpace, Timeline timeline, OutcomeSpace outcomeSpace)
          Create a negotiation session which is used to keep track of the negotiation state.
 
Method Summary
 java.io.Serializable getData(ComponentsEnum component)
          Method used to load the data saved by a component.
 double getDiscountedUtility(Bid bid, double time)
          Returns the discounted utility of a bid given the bid and the time at which it was offered.
 double getDiscountFactor()
          Returns the discount factor of the utilityspace.
 Domain getDomain()
          Returns the negotiation domain.
 java.util.ArrayList<Issue> getIssues()
           
 BidDetails getMaxBidinDomain()
          Returns the best bid in the domain.
 BidDetails getMinBidinDomain()
          Returns the worst bid in the domain.
 BidHistory getOpponentBidHistory()
          Returns the bidding history of the opponent.
 OutcomeSpace getOutcomeSpace()
          Returns the space of possible outcomes in the domain.
 BidHistory getOwnBidHistory()
          Returns the bidding history of the agent.
 SessionData getSessionData()
           
 double getTime()
          Returns the normalized time (t = [0,1])
 Timeline getTimeline()
           
 UtilitySpace getUtilitySpace()
          Returns the utilityspace of the agent.
 void setData(ComponentsEnum component, java.io.Serializable data)
          Method used o store the data of a component.
 void setOutcomeSpace(OutcomeSpace outcomeSpace)
          Method used to set the outcomespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outcomeSpace

protected OutcomeSpace outcomeSpace
Optional outcomespace which should be set manually.


opponentBidHistory

protected BidHistory opponentBidHistory
History of bids made by the opponent.


ownBidHistory

protected BidHistory ownBidHistory
History of bids made by the agent.


domain

protected Domain domain
Reference to the negotiation domain.


utilitySpace

protected UtilitySpace utilitySpace
Reference to the agent's preference profile for the domain.


timeline

protected Timeline timeline
Reference to the timeline.

Constructor Detail

NegotiationSession

protected NegotiationSession()
Special constructor used by the NegotiationSessionWrapper. Do not use this constructor for other purposes.


NegotiationSession

public NegotiationSession(SessionData sessionData,
                          UtilitySpace utilitySpace,
                          Timeline timeline)
Create a negotiation session which is used to keep track of the negotiation state.

Parameters:
utilitySpace - of the agent.
timeline - of the current negotiation.

NegotiationSession

public NegotiationSession(SessionData sessionData,
                          UtilitySpace utilitySpace,
                          Timeline timeline,
                          OutcomeSpace outcomeSpace)
Create a negotiation session which is used to keep track of the negotiation state.

Parameters:
utilitySpace - of the agent.
timeline - of the current negotiation.
outcomeSpace - representation of the possible outcomes.
Method Detail

getOpponentBidHistory

public BidHistory getOpponentBidHistory()
Returns the bidding history of the opponent.

Returns:
bidding history of the opponent.

getOwnBidHistory

public BidHistory getOwnBidHistory()
Returns the bidding history of the agent.

Returns:
bidding history of the agent.

getDiscountFactor

public double getDiscountFactor()
Returns the discount factor of the utilityspace. Each utilityspace has a unique discount factor.

Returns:
discount factor of the utilityspace.

getIssues

public java.util.ArrayList<Issue> getIssues()
Returns:
issues of the domain.

getTimeline

public Timeline getTimeline()
Returns:
timeline of the negotiation.

getTime

public double getTime()
Returns the normalized time (t = [0,1])

Returns:
normalized time.

getDomain

public Domain getDomain()
Returns the negotiation domain.

Returns:
domain of the negotiation.

getUtilitySpace

public UtilitySpace getUtilitySpace()
Returns the utilityspace of the agent.

Returns:
utilityspace of the agent.

getOutcomeSpace

public OutcomeSpace getOutcomeSpace()
Returns the space of possible outcomes in the domain. The returned value may be null.

Returns:
outcomespace if available.

setOutcomeSpace

public void setOutcomeSpace(OutcomeSpace outcomeSpace)
Method used to set the outcomespace. Setting an outcomespace makes method such as getMaxBidinDomain much more efficient.

Parameters:
outcomeSpace - to be set.

getMaxBidinDomain

public BidDetails getMaxBidinDomain()
Returns the best bid in the domain. If the outcomespace is set, it is used in this step. Else a highly inefficient method is used.

Returns:
bid with lowest highest possible utility.

getMinBidinDomain

public BidDetails getMinBidinDomain()
Returns the worst bid in the domain. If the outcomespace is set, it is used in this step. Else a highly inefficient method is used.

Returns:
bid with lowest possible utility.

setData

public void setData(ComponentsEnum component,
                    java.io.Serializable data)
Method used o store the data of a component. For agent programming please use the storeData() method of the BOA component.

Parameters:
component - from which the data is stored.
data - to be stored.

getData

public java.io.Serializable getData(ComponentsEnum component)
Method used to load the data saved by a component. For agent programming please use the loadData() method of the BOA component.

Parameters:
component - from which the data is requested.
Returns:
data saved by the component.

getDiscountedUtility

public double getDiscountedUtility(Bid bid,
                                   double time)
Returns the discounted utility of a bid given the bid and the time at which it was offered.

Parameters:
bid - which discount utility is requested.
time - at which the bid was offered.
Returns:
discounted utility of the given bid at the given time.

getSessionData

public SessionData getSessionData()